/*
 * @Author: 陈亮
 * @LastEditors: 陈亮
 * @GitHub: https://github.com/drinkwd
 * @Description: 安全报表混入，定义data中的变量（变量过多过长）
 * @Date: 2019-03-22 17:44:11
 * @LastEditTime: 2019-04-10 13:27:13
 */
export const toogle = {
  data () {
    return {
      displaytablewarn: false,
      displaytablerisk: false,
      demandCollection: false,
      showreportlist: true,
      optarea: false,
      showdate: false,
      showunit: false,
      showcollection: false,
      showlevel: false,
      showrisklevel: false,
      showtasktype: false,
      form: {
        reportName: 'attackevent',
        reportType: 'week',
        date: '',
        level: '',
        risklevel: '',
        collection: '',
        unit: '',
        tasktype: '',
        dateString: ''
      },
      level: [
        {
          value: '1',
          label: '低危'
        }, {
          value: '2',
          label: '中危'
        }, {
          value: '3',
          label: '高危'
        }, {
          value: '4',
          label: '严重'
        }
      ],
      risklevel: [
        {
          value: '1',
          label: '一般'
        }, {
          value: '2',
          label: '较大'
        }, {
          value: '3',
          label: '重大'
        }, {
          value: '4',
          label: '特大'
        }
      ],
      tasktype: [
        {
          value: '1',
          label: '深度分析任务'
        }, {
          value: '2',
          label: '流量监测任务'
        }, {
          value: '3',
          label: '审计监测任务'
        }, {
          value: '4',
          label: '脆弱性监测任务'
        }
      ],
      pickerOptions2: {
        shortcuts: [{
          text: '最近一周',
          onClick (picker) {
            const end = new Date()
            const start = new Date()
            start.setTime(start.getTime() - 3600 * 1000 * 24 * 7)
            picker.$emit('pick', [start, end])
          }
        }, {
          text: '最近一个月',
          onClick (picker) {
            const end = new Date()
            const start = new Date()
            start.setTime(start.getTime() - 3600 * 1000 * 24 * 30)
            picker.$emit('pick', [start, end])
          }
        }, {
          text: '最近三个月',
          onClick (picker) {
            const end = new Date()
            const start = new Date()
            start.setTime(start.getTime() - 3600 * 1000 * 24 * 90)
            picker.$emit('pick', [start, end])
          }
        }]
      },
      reportName: [{
        value: 'attackevent',
        label: '攻击事件统计报表'
      }, {
        value: 'riskevent',
        label: '风险事项统计报表'
      }, {
        value: 'collection',
        label: '按需采集统计报表'
      }],
      reportType: [{
        value: 'week',
        label: '周报'
      }, {
        value: 'month',
        label: '月报'
      }, {
        value: 'period',
        label: '季度报'
      }, {
        value: 'year',
        label: '年报'
      },
      {
        value: 'customize',
        label: '自定义'
      }]
    }
  }
}
